/*
 * AnimateCommand.java
 *
 * Created on October 28, 2007, 4:18 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package simulationengine.animation;

/**
 *
 * @author edrucker
 */
public class AnimationCommand implements Comparable<AnimationCommand>
{
	
	public enum Command {ADD, REMOVE, BEGIN_SERVICE, END_SERVICE, RETURN_TO_BEGINNING};
	
	private Command command;
	private int time;
	private int ID;
	private int stepNum;
	private int resourceNum;
	
	/** Creates a new instance of AnimateCommand */
	public AnimationCommand()
	{
	}
	
	public AnimationCommand(Command command, int time, int ID, int stepNum, int ResourceNum)
	{
		this.command = command;
		this.time = time;
		this.ID = ID;
		this.stepNum = stepNum;
		this.resourceNum = resourceNum;
	}

	public Command getCommand()
	{
		return command;
	}

	public void setCommand(Command command)
	{
		this.command = command;
	}

	public int getTime()
	{
		return time;
	}

	public void setTime(int time)
	{
		this.time = time;
	}

	public int getID()
	{
		return ID;
	}

	public void setID(int ID)
	{
		this.ID = ID;
	}

	public int getStepNum()
	{
		return stepNum;
	}

	public void setStepNum(int commandModifier)
	{
		this.stepNum = stepNum;
	}
	
	public int getResourceNum()
	{
		return resourceNum;
	}
	
	public void setResourceNum(int resourceNum)
	{
		this.resourceNum = resourceNum;
	}
        
         public int compareTo(AnimationCommand ac)
        {
            if(ac.time > this.time)
            {
                return -1;
            }
            else if(this.time == ac.time)
            {   
                return 0;
            }
            else
            {
                return 1;
            }
        }
}
